package com.sk.waste.app.models

import android.database.Cursor
import com.lc.smc.lib.utils.LCBaseUtil
import org.json.JSONObject
import java.io.Serializable

/**
 *  @time 2025/05/01  11:30
 *  @desc 用户
 */
class UserModel : Serializable {
    var userId: String = ""//
    var realName: String = ""//
    var nickName: String = ""//
    var account: String = ""//
    var avatar: String = ""//
    var sex: String = ""//
    var phone: String = ""//
    var userType: String = ""//
    var vip: String = ""//
    var vipDate: String = ""//
    var address: String = ""//
    var companyNature: String = ""//
    var companyWebsite: String = ""//
    var companyIntroduction: String = ""//
    var mainBusiness: String = ""//

    fun getModelInfo(json: JSONObject) {
        userId = json.getString("userId")
        realName =json.getString("realName")
        nickName =json.getString("nickName")
        account = json.getString("account")
        avatar = json.getString("avatar")
        sex = json.getString("sex")
        phone = json.getString("phone")
        userType = json.getString("userType")
        vip = json.getString("vip")
        vipDate = json.getString("vipDate")
        address = json.getString("address")
        companyNature = json.getString("companyNature")
        companyWebsite = json.getString("companyWebsite")
        companyIntroduction = json.getString("companyIntroduction")
        mainBusiness = json.getString("mainBusiness")
    }

    fun isVip(): Boolean {
        return !LCBaseUtil.isNull(vip) && "VIP".equals(vip, true)
    }
}